When you have completed this example, you will be able to include it in any application for which you need a report manager. To begin this process, start a new project and name it PRTMGR; then name the form in it frmPrintMgr. Table 13.4 lists the controls and the properties you need to set. Place them on the form as shown in Figure 13.24.
TABLE 13.4. THE REPORT MANAGER CONTROLS AND PROPERTY SETTINGS.
Control
Property
Value
ListBox
Name
lstReportName
Multiselect
0-None
Command Button
Name
cmdCancel
Caption
Cancel
Command Button
Name
cmdReport
Caption
Display
Frame
Name
fraWindow
Caption
Reports
Option Button
Name
optDisplay
Caption
Display
Item
0
Value
True
Option Button
Name
optDisplay
Caption
Print
Item
1
Value
False
Command Button
Name
cmdPrtSetup
Caption
Printer
Visible
False
Crystal Reports
Name
rptAddress
Common Dialog
Name
dlgReports
After you've added the controls to the form, you are ready to add the necessary code. The first section of code that should always be added is the declaration section for the variables that will be used in the code. Add the code in Listing 13.1 to the frmAddress form.